package com.alongstudio.account.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;


/**
 * 账户信息
 * 
 */
@Entity
@Table(name = "tbl_account")
public class Account {
	@Id
	@Column(name = "id", length=32)
	@GeneratedValue(generator = "identityGenerator")
	@GenericGenerator(name = "identityGenerator", strategy = "com.alongstudio.account.commons.utils.IdentityGenerator")
	private String id;

	@Column(name = "account_name", length = 50)
	private String accountName;
	/**
	 * Y-已删除，N-未删除
	 */
	@Column(name = "del_tag", length=1)
	private String delTag;
	/**
	 * 0-现金，1-信用卡，2-金融，3-虚拟，4-负债，5-债权
	 */
	@Column(name = "account_type", length=1)
	private char accountType;

	@ManyToOne
	@JoinColumn(name = "fk_currency_id")
	private DictionaryContent currency;// 币种

	@ManyToOne
	@JoinColumn(name = "fk_client_user_id")
	private ClientUser clientUser;// 系统用户
	@Column(name = "create_time")
	private Date createTime;
	@Column(name = "update_time")
	private Date updateTime;
	
	
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	public String getId() {
		return id;
	}

	public String getDelTag() {
		return delTag;
	}

	public void setDelTag(String delTag) {
		this.delTag = delTag;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	public char getAccountType() {
		return accountType;
	}

	public void setAccountType(char accountType) {
		this.accountType = accountType;
	}

	public DictionaryContent getCurrency() {
		return currency;
	}

	public void setCurrency(DictionaryContent currency) {
		this.currency = currency;
	}

	public ClientUser getClientUser() {
		return clientUser;
	}

	public void setClientUser(ClientUser clientUser) {
		this.clientUser = clientUser;
	}

}
